<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%
    String path = request.getContextPath();  
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  
   
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
contextPath=${base};
<form action="login.do" method="post">
	name<input type="text" name="name" />&nbsp;
	passwd<input type="password" name="password"/>&nbsp;
	<input type="submit" value="login" />
</form>
<br/>
  
<form action="userServlet" method="post">
	name<input type="text" name="name" />&nbsp;
	passwd<input type="password" name="password"/>&nbsp;
	<input type="submit" value="login" />
</form>
  

</body>
</html>